import { HashLocationStrategy, LocationStrategy } from '@angular/common';
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { MyInterceptorInterceptor } from './interceptor/my-interceptor.interceptor';
import { DynamicModule } from './modules/dynamic/dynamic.module';
import { HomeModule } from './modules/home/home.module';
import { LoginModule } from './modules/login/login.module';
import { MeModule } from './modules/me/me.module';
import { NavModule } from './modules/nav/nav.module';
import { ShareModule } from './modules/share/share.module';

import { registerLocaleData } from '@angular/common';
import zh from '@angular/common/locales/zh';
import { ngZorroConfig } from './config/ng-zorro.config';
import { NZ_CONFIG } from 'ng-zorro-antd/core/config';

import { BusinessModule } from './modules/business/business.module';
import { InformationModule } from './modules/information/information.module';
import { FeeEnquiryModule } from './modules/fee-enquiry/fee-enquiry.module';

registerLocaleData(zh);

@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    ShareModule,
    HomeModule,
    LoginModule,
    MeModule,
    InformationModule,
    DynamicModule,
    NavModule,
    BusinessModule,
    FeeEnquiryModule,
    AppRoutingModule,
  ],
  providers: [
    { provide: LocationStrategy, useClass: HashLocationStrategy },
    { provide: HTTP_INTERCEPTORS, useClass: MyInterceptorInterceptor, multi: true },
    { provide: NZ_CONFIG, useValue:  ngZorroConfig  }
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
